// $ANTLR 3.3 Nov 30, 2010 12:50:56 /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g 2012-03-26 13:17:41

import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

public class LispyLexer extends Lexer {
    public static final int EOF=-1;
    public static final int T__7=7;
    public static final int T__8=8;
    public static final int T__9=9;
    public static final int T__10=10;
    public static final int T__11=11;
    public static final int T__12=12;
    public static final int NUM=4;
    public static final int ID=5;
    public static final int WS=6;

    // delegates
    // delegators

    public LispyLexer() {;} 
    public LispyLexer(CharStream input) {
        this(input, new RecognizerSharedState());
    }
    public LispyLexer(CharStream input, RecognizerSharedState state) {
        super(input,state);

    }
    public String getGrammarFileName() { return "/home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g"; }

    // $ANTLR start "T__7"
    public final void mT__7() throws RecognitionException {
        try {
            int _type = T__7;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:3:6: ( '(' )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:3:8: '('
            {
            match('('); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__7"

    // $ANTLR start "T__8"
    public final void mT__8() throws RecognitionException {
        try {
            int _type = T__8;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:4:6: ( ')' )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:4:8: ')'
            {
            match(')'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__8"

    // $ANTLR start "T__9"
    public final void mT__9() throws RecognitionException {
        try {
            int _type = T__9;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:5:6: ( 'read' )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:5:8: 'read'
            {
            match("read"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__9"

    // $ANTLR start "T__10"
    public final void mT__10() throws RecognitionException {
        try {
            int _type = T__10;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:6:7: ( 'print' )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:6:9: 'print'
            {
            match("print"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__10"

    // $ANTLR start "T__11"
    public final void mT__11() throws RecognitionException {
        try {
            int _type = T__11;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:7:7: ( 'let' )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:7:9: 'let'
            {
            match("let"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__11"

    // $ANTLR start "T__12"
    public final void mT__12() throws RecognitionException {
        try {
            int _type = T__12;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:8:7: ( 'repeat' )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:8:9: 'repeat'
            {
            match("repeat"); 


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "T__12"

    // $ANTLR start "NUM"
    public final void mNUM() throws RecognitionException {
        try {
            int _type = NUM;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:49:5: ( ( '0' .. '9' )+ )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:49:7: ( '0' .. '9' )+
            {
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:49:7: ( '0' .. '9' )+
            int cnt1=0;
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( ((LA1_0>='0' && LA1_0<='9')) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:49:8: '0' .. '9'
            	    {
            	    matchRange('0','9'); 

            	    }
            	    break;

            	default :
            	    if ( cnt1 >= 1 ) break loop1;
                        EarlyExitException eee =
                            new EarlyExitException(1, input);
                        throw eee;
                }
                cnt1++;
            } while (true);


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "NUM"

    // $ANTLR start "WS"
    public final void mWS() throws RecognitionException {
        try {
            int _type = WS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:50:4: ( ( ' ' | '\\t' | '\\n' ) )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:50:6: ( ' ' | '\\t' | '\\n' )
            {
            if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)==' ' ) {
                input.consume();

            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;}

            skip();

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "WS"

    // $ANTLR start "ID"
    public final void mID() throws RecognitionException {
        try {
            int _type = ID;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:51:4: ( ( 'a' .. 'z' ) )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:51:6: ( 'a' .. 'z' )
            {
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:51:6: ( 'a' .. 'z' )
            // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:51:7: 'a' .. 'z'
            {
            matchRange('a','z'); 

            }


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        }
    }
    // $ANTLR end "ID"

    public void mTokens() throws RecognitionException {
        // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:8: ( T__7 | T__8 | T__9 | T__10 | T__11 | T__12 | NUM | WS | ID )
        int alt2=9;
        alt2 = dfa2.predict(input);
        switch (alt2) {
            case 1 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:10: T__7
                {
                mT__7(); 

                }
                break;
            case 2 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:15: T__8
                {
                mT__8(); 

                }
                break;
            case 3 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:20: T__9
                {
                mT__9(); 

                }
                break;
            case 4 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:25: T__10
                {
                mT__10(); 

                }
                break;
            case 5 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:31: T__11
                {
                mT__11(); 

                }
                break;
            case 6 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:37: T__12
                {
                mT__12(); 

                }
                break;
            case 7 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:43: NUM
                {
                mNUM(); 

                }
                break;
            case 8 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:47: WS
                {
                mWS(); 

                }
                break;
            case 9 :
                // /home/ubuntu/kenpu-teaching/201201/csci4020u/06-lispy-language/src/Lispy.g:1:50: ID
                {
                mID(); 

                }
                break;

        }

    }


    protected DFA2 dfa2 = new DFA2(this);
    static final String DFA2_eotS =
        "\3\uffff\3\10\10\uffff";
    static final String DFA2_eofS =
        "\16\uffff";
    static final String DFA2_minS =
        "\1\11\2\uffff\1\145\1\162\1\145\3\uffff\1\141\4\uffff";
    static final String DFA2_maxS =
        "\1\172\2\uffff\1\145\1\162\1\145\3\uffff\1\160\4\uffff";
    static final String DFA2_acceptS =
        "\1\uffff\1\1\1\2\3\uffff\1\7\1\10\1\11\1\uffff\1\4\1\5\1\3\1\6";
    static final String DFA2_specialS =
        "\16\uffff}>";
    static final String[] DFA2_transitionS = {
            "\2\7\25\uffff\1\7\7\uffff\1\1\1\2\6\uffff\12\6\47\uffff\13\10"+
            "\1\5\3\10\1\4\1\10\1\3\10\10",
            "",
            "",
            "\1\11",
            "\1\12",
            "\1\13",
            "",
            "",
            "",
            "\1\14\16\uffff\1\15",
            "",
            "",
            "",
            ""
    };

    static final short[] DFA2_eot = DFA.unpackEncodedString(DFA2_eotS);
    static final short[] DFA2_eof = DFA.unpackEncodedString(DFA2_eofS);
    static final char[] DFA2_min = DFA.unpackEncodedStringToUnsignedChars(DFA2_minS);
    static final char[] DFA2_max = DFA.unpackEncodedStringToUnsignedChars(DFA2_maxS);
    static final short[] DFA2_accept = DFA.unpackEncodedString(DFA2_acceptS);
    static final short[] DFA2_special = DFA.unpackEncodedString(DFA2_specialS);
    static final short[][] DFA2_transition;

    static {
        int numStates = DFA2_transitionS.length;
        DFA2_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA2_transition[i] = DFA.unpackEncodedString(DFA2_transitionS[i]);
        }
    }

    class DFA2 extends DFA {

        public DFA2(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 2;
            this.eot = DFA2_eot;
            this.eof = DFA2_eof;
            this.min = DFA2_min;
            this.max = DFA2_max;
            this.accept = DFA2_accept;
            this.special = DFA2_special;
            this.transition = DFA2_transition;
        }
        public String getDescription() {
            return "1:1: Tokens : ( T__7 | T__8 | T__9 | T__10 | T__11 | T__12 | NUM | WS | ID );";
        }
    }
 

}